summaryrefslogtreecommitdiff
path: root/app/[lng]
diff options
context:
space:
mode:
Diffstat (limited to 'app/[lng]')
-rw-r--r--app/[lng]/evcp/(evcp)/layout.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/[lng]/evcp/(evcp)/layout.tsx b/app/[lng]/evcp/(evcp)/layout.tsx
index 7fe7f3e7..c5e75a4c 100644
--- a/app/[lng]/evcp/(evcp)/layout.tsx
+++ b/app/[lng]/evcp/(evcp)/layout.tsx
@@ -12,8 +12,11 @@ export default async function EvcpLayout({ children }: { children: ReactNode })
let isAuthorized = true;
let authMessage = "";
- // Only check permission if user is logged in
- if (session?.user?.id) {
+ // Skip permission check if environment variable is set
+ const skipPermissionCheck = process.env.SKIP_ORACLE_PERMISSION_CHECK === 'true';
+
+ // Only check permission if user is logged in and check is not skipped
+ if (session?.user?.id && !skipPermissionCheck) {
try {
const result = await verifyNonsapPermission(
parseInt(session.user.id),
@@ -34,7 +37,9 @@ export default async function EvcpLayout({ children }: { children: ReactNode })
<div className="relative flex min-h-svh flex-col bg-background">
{/* <div className="relative flex min-h-svh flex-col bg-slate-100 "> */}
<Header />
- <PermissionChecker authorized={isAuthorized} message={authMessage} />
+ {!skipPermissionCheck && (
+ <PermissionChecker authorized={isAuthorized} message={authMessage} />
+ )}
<main className="flex flex-1 flex-col">
<div className='container-wrapper'>
{children}